package com.dzsw.javabase.optional;

import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Optional;

@Setter
@Accessors(chain = true)
public class Person {

    private String name;

    private Integer age;

    private String pwd;

    public Optional<String> getName() {
        return Optional.ofNullable(name);
    }

    public Optional<Integer> getAge() {
        return Optional.ofNullable(age);
    }

    public Optional<String> getPwd() {
        return Optional.ofNullable(pwd);
    }
}
